pal_renda <- colorQuantile("Blues", mapa_campina_setor$Renda, n = 7)

leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_renda(mapa_campina_setor$Renda)) %>%
  addPolygons(data = escolas_anos_iniciais_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_ideb_iniciais,
             lng=~escolas_ideb_iniciais$NU_LONGITUDE, lat=~escolas_ideb_iniciais$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_ideb_iniciais$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )
leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_renda(mapa_campina_setor$Renda)) %>%
  addPolygons(data = escolas_anos_finais_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_ideb_finais,
             lng=~escolas_ideb_finais$NU_LONGITUDE, lat=~escolas_ideb_finais$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_ideb_finais$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )
leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_renda(mapa_campina_setor$Renda)) %>%
  addPolygons(data = escolas_enem_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_enem,
             lng=~escolas_enem$NU_LONGITUDE, lat=~escolas_enem$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_enem$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )
pal_densidade <- colorQuantile("Purples", mapa_campina_setor$hab_domicilio, n = 7)

leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_densidade(mapa_campina_setor$hab_domicilio)) %>%
  addPolygons(data = escolas_anos_iniciais_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_ideb_iniciais,
             lng=~escolas_ideb_iniciais$NU_LONGITUDE, lat=~escolas_ideb_iniciais$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_ideb_iniciais$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )
leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_densidade(mapa_campina_setor$hab_domicilio)) %>%
  addPolygons(data = escolas_anos_finais_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_ideb_finais,
             lng=~escolas_ideb_finais$NU_LONGITUDE, lat=~escolas_ideb_finais$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_ideb_finais$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )
leaflet(height = 700) %>%
  addProviderTiles("Hydda.Base") %>%
  addPolygons(data = mapa_campina_setor, weight = 2, opacity = 0.5, color = "#505151", fillOpacity = 0.7,
              smoothFactor = 0.5, dashArray = "3", stroke = TRUE, fillColor = ~pal_densidade(mapa_campina_setor$hab_domicilio)) %>%
  addPolygons(data = escolas_enem_vor, stroke = TRUE, color = "#ED212B", weight = 2,
              opacity = 0.5, fill = FALSE, dashArray = "3", smoothFactor = 0.5) %>%
  addPolygons(data = mapa_campina_bairros, weight = 1, opacity = 1, color = "#282828", fill = FALSE,
              smoothFactor = 0.5, stroke = TRUE, popup = mapa_campina_bairros$Nome_do_bairro) %>%
  addCircles(data=escolas_enem,
             lng=~escolas_enem$NU_LONGITUDE, lat=~escolas_enem$NU_LATITUDE,
             radius=~55, # size is in m for addCircles O_o
             stroke=FALSE, opacity=1, fillColor="#FFE347", fillOpacity=1,
             label = escolas_enem$NO_ESCOLA_y,
             labelOptions = labelOptions(
               style = list("font-weight" = "normal", padding = "3px 5px"),
               textsize = "15px", direction = "auto")
             )